package uztest;

import java.util.List;

import org.hibernate.Query;
import org.hibernate.Session;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import atempdao.EgnPortfolioDao;
import atempdao.EgnProductDao;

import dao.EgnPortfolio;
import dao.EgnPortfolioHome;
import dao.EgnProduct;


public class TestEgnPortfolio {
	private final static Logger logger =
		LoggerFactory.getLogger(TestEgnPortfolio.class);

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		aaa();
		bbb();
		ccc();
		ddd();
		eee();
//		fff();
//		ggg();
	}
	
	private static void aaa(){
		List<EgnPortfolio> rst ;
		rst =EgnPortfolioDao.getAllEgnPortfolio();

		for(EgnPortfolio aa: rst){
			logger.debug("Mv Type 1 :{},{}",aa.getPortfolioId(), aa.getPortfolioType());
		}
		
	}
	private static void bbb(){
		List<EgnPortfolio> rst ;
		rst =EgnPortfolioDao.getRootEngPortfolio();
		for(EgnPortfolio aa: rst){
			logger.debug("Mv Type 2 :{},{}",aa.getPortfolioId());
		}
	}
	private static void ccc(){
		EgnPortfolio rst;
		String portfolioId = "PORT_2";
		rst = EgnPortfolioDao.getEgnPortfolio(portfolioId);
		logger.debug("Mv Type 3 :{},{}",rst.getPortfolioId());
		
	}
	private static void ddd(){
		String portfolioId ="PORT_3";
		List<EgnPortfolio> rst ;
		rst =EgnPortfolioDao.getChildEgnPortfolio(portfolioId);

		for(EgnPortfolio aa: rst){
			logger.debug("Mv Type 44 :{},{}",aa.getPortfolioId());
		}
	}
	private static void eee(){
		String portfolioId ="PORT_3";
		List<String> rst ;
		rst =EgnPortfolioDao.getChildEgnPositionId(portfolioId);

		for(String aa: rst){
			logger.debug("Mv Type 6 :{},{}",aa);
		}
	}
//	private static void fff(){
//		EgnRstScenarioId sceId = new EgnRstScenarioId("UD_FLAT", "","");
//		String rst ;
//		rst =EgnRstScenarioDao.getEgnRstScenaioSetId(sceId);
//		logger.debug("Mv Type 5 :{},{}",rst);
//		
//	}
//	private static void ggg(){
//		EgnRstScenarioId sceId = new EgnRstScenarioId("UD_FLAT", "","");
//		List rst ;
//		rst =EgnRstScenarioDao.getEgnMarketVariScenario(sceId);
//		
//		for(int i=0 ; i<rst.size();i++){
//			Object[] aa = (Object[])rst.get(i);
//			logger.debug("Mv Type 6 :{},{}",aa[2],aa[1]);
//		}
//			
//		
//	}
}
